<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑图书</title>
    <%@ include file="/pages/common/base_js_jq.jsp"%>
    <style type="text/css">
        h1 {
            text-align: center;
            margin-top: 200px;
        }

        h1 a {
            color:red;
        }

        input {
            text-align: center;
        }
    </style>
</head>
<body>
<div id="header">
    <%--../../static/img/logo.gif--%>
    <img class="logo_img" alt="" src="static/img/logo.gif" >
    <span class="wel_word">编辑图书</span>
    <%@ include file="/pages/common/manager_head.jsp"%>
</div>

<div id="main">
    <form action="updateBook" method="post">
        <input type="hidden" name="_method" value="put">
        <table>
            <tr>
                <td></td>
                <td>名称</td>
                <td>价格</td>
                <td>作者</td>
                <td>销量</td>
                <td>库存</td>
                <td>类型</td>
            </tr>
            <tr>
                <td><input name="id" value="${book.id}" type="hidden"></td>
                <td><input name="name" value="${book.name}" type="text"/></td>
                <td><input name="price" value="${book.price}" type="text"/></td>
                <td><input name="author" value="${book.author}" type="text"/></td>
                <td><input name="sales" value="${book.sales}" type="text"/></td>
                <td><input name="stock" value="${book.stock}" type="text"/></td>
                <td>
                    <select name="type">
                        <option value="${book.type}">${book.type}</option>
                        <c:forEach items="${type}" var="type">
                            <option value="${type.typename}">${type.typename}</option>
                        </c:forEach>
                    </select>
                </td>
                <td><input type="submit" value="提交"/></td>
            </tr>
        </table>
    </form>
</div>

<%@ include file="/pages/common/footer_all.jsp"%>
</body>
</html>